{{ _('Hello') }},
{% autoescape false %}
<br/><br/>{{ _('Thank you for signing up for %(event_name)s.', event_name = '<a href="%s">%s</a>' % (order.event.site_link, order.event.name)) | safe }}
<br/><br/>{{ _('This is your confirmation.') }} {{ _('You can download your %(open_link)stickets or registration information here%(close_link)s.', open_link = '<a href="%s">' % (order_view_url), close_link = '</a>') | safe }}
{% endautoescape %}
<br/><br/>{{ _('Order Summary') }}:
<br/>{{ _('Name') }}: {{ order.user.full_name }}
{% for i, attendee in attendees | groupby('ticket_id') %}
    <br/>{{ _('Ticket') }}: {{ attendee.0.ticket.name }}
    <br/>{{ _('Quantity') }}: {{ attendee | length }}
{% endfor %}
<br/>{{ _('Order Number') }}: {{ order.invoice_number }}
<br/>
<br/>{{ _('About this event') }}:
<br/>{{ _('Date') }}: {{ starts_at }} - {{ ends_at }}
<br/>{{ _('Location') }}: {{ order.event.event_location_status }}
<br/>{{ _('URL') }}: {{ order.event.site_link }}
<br/>
<br/>{{ _('Add to calendar') }}:    <a href="https://calendar.google.com/calendar/render?action=TEMPLATE&dates={{ order.event.starts_at.strftime('%Y%m%dT%H%M') }}/{{ order.event.ends_at.strftime('%Y%m%dT%H%M') }}&text={{ order.event.name }}&location={{ order.event.normalized_location }}&ctz={{ order.event.timezone }}&details={{ order.event.description }}">{{ _('Google Calendar') }}</a> &bull;
                                    <a href="{{ settings.static_domain }}/v1/events/{{ order.event.identifier }}.ics?download">{{ _('iCal') }}</a> &bull;
                                    <a href="https://calendar.yahoo.com/?v=60&title={{ order.event.name }}&st={{ order.event.starts_at.strftime('%Y%m%dT%H%M') }}&et={{ order.event.ends_at.strftime('%Y%m%dT%H%M') }}&desc={{ order.event.description }}&in_loc={{ order.event.normalized_location }}">{{ _('Yahoo') }}</a> &bull;
                                    <a href="https://outlook.live.com/calendar/0/deeplink/compose?subject={{ order.event.name }}&startdt={{ order.event.starts_at.strftime('%Y-%m-%dT%H:%M') }}&enddt={{ order.event.ends_at.strftime('%Y-%m-%dT%H:%M') }}&body={{ order.event.description }}&location={{ order.event.normalized_location }}">{{ _('Outlook') }}</a>
<br/>
{% if order.event.after_order_message | strip_tags != '' %}
    <br/>{{ _('Below you find a message from the organizer') }}:
    <br/>
    <div style="white-space: pre-line;">
        {% autoescape false %}
            {{ order.event.after_order_message }}
        {% endautoescape %}
    </div>
{% endif %}
<br/>{{ _('Best regards') }},
<br/>{{ settings.app_name }} {{ _('Team') }}
<br/>--
{% autoescape false %}
<br/>{{ _('Login to manage your orders at %(url)s.', url = '<a href="%s">%s</a>' % (settings.frontend_url, settings.frontend_url)) | safe }}
{% endautoescape %}
